src %URI; #REQUIRED
type %VDI_TYPE; #REQUIRED
size CDATA #REQUIRED
- shareable CDATA #REQUIRED
+ sharable CDATA #REQUIRED
read_only CDATA #REQUIRED>
<!ELEMENT name (label,
"SR": self.DEFAULT_STORAGE_REPOSITORY,
"virtual_size": vdi.attributes["size"].value,
"type": vdi.attributes["type"].value,
- "shareable": vdi.attributes["shareable"].value,
- "read_only": vdi.attributes["read_only"].value,
+ "sharable": bool(vdi.attributes["sharable"].value),
+ "read_only": bool(vdi.attributes["read_only"].value),
"other_config": {"location":
vdi.attributes["src"].value}
}
vdi.attributes["src"] = src
vdi.attributes["read_only"] \
= (get_child_by_name(vbd_sxp, "mode") != "w") \
- and "true" or "false"
+ and "True" or "False"
vdi.attributes["size"] = '-1'
vdi.attributes["type"] = "system"
- vdi.attributes["shareable"] = "false"
+ vdi.attributes["sharable"] = "False"
vdi.attributes["name"] = name
vdi.appendChild(self.make_name_tag(name, document))